﻿using ConsoleApp6;
using System;

namespace ConsoleApp6
{
    interface IExpedite
    {
        object Expedite { get; set; }

        void Expeedite();
       
    }
    interface IFly
    {
        void Fly();
    }
    interface IFire : IFly
    {
        void Fly();
        void Fire();
    }
    class Car
    {

        private string brand;
        private string type;
        public string Brand
        {
            get { return this.brand; }
            set { this.brand = value; }
        }
        public string Type
        {
            get { return this.type; }
            set { this.type = value; }
        }
        public Car() { }

        public Car(string brand, string type)
        {
            this.brand = brand;
            this.type = type;
        }

        public void Run()
        {
            Console.WriteLine("一辆牌子是{0}，型号为{1}的车在路上行使", this.Brand, this.Type);
        }

    }
    class Batmobile : Car, IFly, IFire, IExpedite
    {
        object IExpedite.Expedite { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

        public void Fire()
        {
            Console.WriteLine("一辆品牌是{0}，型号是{1}的车在加大火力", base.Brand, this.Type);
        }
        public void Fly()
        {
            Console.WriteLine("一辆品牌是{0}，型号是{1}的车在飞行过海", base.Brand, this.Type);
        }
        public void Expedite()
        {
            Console.WriteLine("一辆品牌是{0}，型号是{1}的车在加速飞行", base.Brand, this.Type);
        }

        public void Expeedite()
        {
            throw new NotImplementedException();
        }

        public Batmobile(string brand, string type) : base(brand, type)
        {

        }

    }
}
class BMWCar : Car, IExpedite
{
    object IExpedite.Expedite { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

    public void Expedite()
    {
        Console.WriteLine("一辆品牌是{0}，型号是{1}的车在加速", base.Brand, this.Type);
    }

    public void Expeedite()
    {
        throw new NotImplementedException();
    }

    public BMWCar(string brand, string type) : base(brand, type)
    {

    }
    class Program
    {
        static void TestFire(IFire fire)
        {
            fire.Fire();
        }
        static void TestFly(IFly fly)
        {
            fly.Fly();
        }
        static void TestExpedite(IExpedite expedite)
        {
            expedite.Expeedite();
                }
        static void Main(string[] args)
        {
                BMWCar bmwCar1 = new BMWCar("丰驰", "680");
                bmwCar1.Run();
                TestExpedite(bmwCar1);
                Console.WriteLine();
                BMWCar bmwCar2 = new BMWCar("宝马max", "X5");
                bmwCar2.Run();
                TestExpedite(bmwCar2);
                Console.WriteLine();
                Batmobile batCar = new Batmobile("蝙蝠战车", "第六代");
                batCar.Run();
                batCar.Fly();
                TestExpedite(batCar);
                TestFire(batCar);
                Console.ReadKey();

            Superman superman = new Superman("哆啦爱梦");
            Bird bird = new Bird("王五");
            Plane plane = new Plane("陶光");
            TestFly(superman);
            TestLand(superman);
            TestEat(superman);
            Console.WriteLine();
            TestFly(bird);
            TestLand(bird);
            TestEat(bird);
            Console.WriteLine();
            TestFly(plane);
            TestLand(plane);
            TestEat(plane);
            Console.WriteLine();
            Console.ReadKey();
        }

        private static void TestEat(Plane plane)
        {
            throw new NotImplementedException();
        }

        private static void TestLand(Plane plane)
        {
            throw new NotImplementedException();
        }

        private static void TestEat(Bird bird)
        {
            throw new NotImplementedException();
        }

        private static void TestLand(Bird bird)
        {
            throw new NotImplementedException();
        }

        private static void TestEat(Superman superman)
        {
            throw new NotImplementedException();
        }

        private static void TestLand(Superman superman)
        {
            throw new NotImplementedException();
        }
    }
    }
   